gtk_snapshot_transform
gtk_snapshot_translate_2d
gtk_snapshot_append_node
-gtk_snapshot_append_cairo_node
-gtk_snapshot_append_texture_node
-gtk_snapshot_append_color_node
+gtk_snapshot_append_cairo
+gtk_snapshot_append_texture
+gtk_snapshot_append_color
gtk_snapshot_clips_rect
gtk_snapshot_render_background
gtk_snapshot_render_frame
to a cairo surface. Instead, they have a snapshot() function that creates
one or more GskRenderNodes to represent their content. Third-party widgets
that use a draw() function or a #GtkWidget::draw signal handler for custom
- drawing will need to be converted to use gtk_snapshot_append_cairo_node().
+ drawing will need to be converted to use gtk_snapshot_append_cairo().
</para>
<para>
The auxiliary #GtkSnapshot object has APIs to help with creating render
gtk_style_context_get_color (context, &color);
- gtk_snapshot_append_color_node (snapshot,
- &color,
- &GRAPHENE_RECT_INIT (
- day_rect.x + 2, y_loc,
- day_rect.width - 2, 1
- ),
- "CalendarDetailSeparator");
+ gtk_snapshot_append_color (snapshot,
+ &color,
+ &GRAPHENE_RECT_INIT (
+ day_rect.x + 2, y_loc,
+ day_rect.width - 2, 1
+ ),
+ "CalendarDetailSeparator");
y_loc += 2;
}
if (priv->cell_background_set && !selected)
{
- gtk_snapshot_append_color_node (snapshot,
- &priv->cell_background,
- &GRAPHENE_RECT_INIT (
- background_area->x, background_area->y,
- background_area->width, background_area->height
- ),
- "CellBackground");
+ gtk_snapshot_append_color (snapshot,
+ &priv->cell_background,
+ &GRAPHENE_RECT_INIT (
+ background_area->x, background_area->y,
+ background_area->width, background_area->height
+ ),
+ "CellBackground");
}
gtk_snapshot_push_clip (snapshot,
if (!gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect))
return;
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &GRAPHENE_RECT_INIT (
- cell_area->x, cell_area->y,
- cell_area->width, cell_area->height
- ),
- "CellSpinner");
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &GRAPHENE_RECT_INIT (
+ cell_area->x, cell_area->y,
+ cell_area->width, cell_area->height
+ ),
+ "CellSpinner");
gtk_paint_spinner (gtk_widget_get_style_context (widget),
cr,
if (priv->background_set && (flags & GTK_CELL_RENDERER_SELECTED) == 0)
{
- gtk_snapshot_append_color_node (snapshot,
- &priv->background,
- &GRAPHENE_RECT_INIT(
- background_area->x, background_area->y,
- background_area->width, background_area->height
- ),
- "CellTextBackground");
+ gtk_snapshot_append_color (snapshot,
+ &priv->background,
+ &GRAPHENE_RECT_INIT(
+ background_area->x, background_area->y,
+ background_area->width, background_area->height
+ ),
+ "CellTextBackground");
}
gtk_cell_renderer_get_padding (cell, &xpad, &ypad);
width = gtk_widget_get_allocated_width (widget);
height = gtk_widget_get_allocated_height (widget);
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &GRAPHENE_RECT_INIT (0, 0, width, height),
- "ColorPlane");
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &GRAPHENE_RECT_INIT (0, 0, width, height),
+ "ColorPlane");
cairo_set_source_surface (cr, plane->priv->surface, 0, 0);
cairo_paint (cr);
if (width <= 1 || height <= 1)
return;
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &GRAPHENE_RECT_INIT(x, y, width, height),
- "ColorScaleTrough");
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &GRAPHENE_RECT_INIT(x, y, width, height),
+ "ColorScaleTrough");
cairo_translate (cr, x, y);
if (gtk_orientable_get_orientation (GTK_ORIENTABLE (widget)) == GTK_ORIENTATION_HORIZONTAL &&
{
cairo_t *cr;
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &content_box.bounds,
- "CheckeredBackground");
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &content_box.bounds,
+ "CheckeredBackground");
cairo_set_source_rgb (cr, 0.33, 0.33, 0.33);
cairo_paint (cr);
cairo_destroy (cr);
- gtk_snapshot_append_color_node (snapshot,
- &swatch->priv->color,
- &content_box.bounds,
- "ColorSwatch Color");
+ gtk_snapshot_append_color (snapshot,
+ &swatch->priv->color,
+ &content_box.bounds,
+ "ColorSwatch Color");
}
else
{
color.alpha = 1.0;
- gtk_snapshot_append_color_node (snapshot,
- &color,
- &content_box.bounds,
- "ColorSwatch Opaque Color");
+ gtk_snapshot_append_color (snapshot,
+ &color,
+ &content_box.bounds,
+ "ColorSwatch Opaque Color");
}
gtk_snapshot_pop (snapshot);
{
cairo_t *cr;
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &GRAPHENE_RECT_INIT (0, 0, width, height),
- "Fallback<%s>", G_OBJECT_TYPE_NAME (image));
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &GRAPHENE_RECT_INIT (0, 0, width, height),
+ "Fallback<%s>", G_OBJECT_TYPE_NAME (image));
_gtk_css_image_draw (image, cr, width, height);
cairo_destroy (cr);
}
return;
}
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &GRAPHENE_RECT_INIT (0, 0, width, height),
- "BuiltinImage<%d>", (int) image_type);
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &GRAPHENE_RECT_INIT (0, 0, width, height),
+ "BuiltinImage<%d>", (int) image_type);
gtk_css_image_builtin_draw (image, cr, width, height, image_type);
cairo_destroy (cr);
}
else
color = &red;
- gtk_snapshot_append_color_node (snapshot, color, &GRAPHENE_RECT_INIT (0, 0, width, height), "image() Fallback Color");
+ gtk_snapshot_append_color (snapshot, color, &GRAPHENE_RECT_INIT (0, 0, width, height), "image() Fallback Color");
}
else
gtk_css_image_snapshot (fallback->images[fallback->used], snapshot, width, height);
texture_width = (double) gdk_pixbuf_get_width (pixbuf) / icon_theme->scale;
texture_height = (double) gdk_pixbuf_get_height (pixbuf) / icon_theme->scale;
- gtk_snapshot_append_texture_node (snapshot,
- texture,
- &GRAPHENE_RECT_INIT(
- (width - texture_width) / 2.0,
- (height - texture_height) / 2.0,
- texture_width,
- texture_height
- ),
- "CssImageIconTheme<%s@%d>", icon_theme->name, icon_theme->scale);
+ gtk_snapshot_append_texture (snapshot,
+ texture,
+ &GRAPHENE_RECT_INIT(
+ (width - texture_width) / 2.0,
+ (height - texture_height) / 2.0,
+ texture_width,
+ texture_height
+ ),
+ "CssImageIconTheme<%s@%d>", icon_theme->name, icon_theme->scale);
g_object_unref (texture);
g_object_unref (pixbuf);
* get the color of the last color stop */
GtkCssImageLinearColorStop *stop = &g_array_index (linear->stops, GtkCssImageLinearColorStop, linear->stops->len - 1);
- gtk_snapshot_append_color_node (snapshot,
- _gtk_css_rgba_value_get_rgba (stop->color),
- &GRAPHENE_RECT_INIT (0, 0, width, height),
- "RepeatingLinearGradient<degenerate>");
+ gtk_snapshot_append_color (snapshot,
+ _gtk_css_rgba_value_get_rgba (stop->color),
+ &GRAPHENE_RECT_INIT (0, 0, width, height),
+ "RepeatingLinearGradient<degenerate>");
return;
}
if (surface->texture == NULL)
return;
- gtk_snapshot_append_texture_node (snapshot,
- surface->texture,
- &GRAPHENE_RECT_INIT (0, 0, width, height),
- "Surface Image %dx%d",
- gsk_texture_get_width (surface->texture),
- gsk_texture_get_height (surface->texture));
+ gtk_snapshot_append_texture (snapshot,
+ surface->texture,
+ &GRAPHENE_RECT_INIT (0, 0, width, height),
+ "Surface Image %dx%d",
+ gsk_texture_get_width (surface->texture),
+ gsk_texture_get_height (surface->texture));
}
static void
for (i = 0; i < cairo_region_num_rectangles (draw->region); i++)
{
cairo_region_get_rectangle (draw->region, i, &rect);
- gtk_snapshot_append_color_node (snapshot,
- &(GdkRGBA) { 1, 0, 0, 0.4 * (1 - progress) },
- &GRAPHENE_RECT_INIT(rect.x, rect.y, rect.width, rect.height),
- "Debug Updates<%g>", progress);
+ gtk_snapshot_append_color (snapshot,
+ &(GdkRGBA) { 1, 0, 0, 0.4 * (1 - progress) },
+ &GRAPHENE_RECT_INIT(rect.x, rect.y, rect.width, rect.height),
+ "Debug Updates<%g>", progress);
}
}
}
if (!priv->draw_func)
return;
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &GRAPHENE_RECT_INIT (0, 0,
- gtk_widget_get_allocated_width (widget),
- gtk_widget_get_allocated_height (widget)),
- "DrawingAreaContents");
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &GRAPHENE_RECT_INIT (
+ 0, 0,
+ gtk_widget_get_allocated_width (widget),
+ gtk_widget_get_allocated_height (widget)
+ ),
+ "DrawingAreaContents");
priv->draw_func (self,
cr,
gtk_widget_get_allocated_width (widget),
gtk_css_gadget_snapshot (priv->progress_gadget, snapshot);
/* Draw text and cursor */
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &GRAPHENE_RECT_INIT (x + priv->text_x,
- y,
- priv->text_width,
- height),
- "Entry Text");
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &GRAPHENE_RECT_INIT (x + priv->text_x,
+ y,
+ priv->text_width,
+ height),
+ "Entry Text");
if (priv->dnd_position != -1)
gtk_entry_draw_cursor (GTK_ENTRY (widget), cr, CURSOR_DND);
vertical = priv->orientation == GTK_ORIENTATION_VERTICAL;
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &GRAPHENE_RECT_INIT (x, y, width, height),
- "FlowBox Rubberband");
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &GRAPHENE_RECT_INIT (x, y, width, height),
+ "FlowBox Rubberband");
context = gtk_widget_get_style_context (widget);
gtk_style_context_save_to_node (context, priv->rubberband_node);
range_clip = gdk_pango_layout_get_clip_region (priv->layout, lx, ly, range, 1);
cairo_region_get_extents (range_clip, &clip_extents);
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &GRAPHENE_RECT_FROM_RECT (&clip_extents),
- "Selected Text");
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &GRAPHENE_RECT_FROM_RECT (&clip_extents),
+ "Selected Text");
gtk_style_context_save_to_node (context, info->selection_node);
gdk_cairo_region (cr, range_clip);
range_clip = gdk_pango_layout_get_clip_region (priv->layout, lx, ly, range, 1);
cairo_region_get_extents (range_clip, &clip_extents);
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &GRAPHENE_RECT_FROM_RECT(&clip_extents),
- "Active Link");
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &GRAPHENE_RECT_FROM_RECT(&clip_extents),
+ "Active Link");
gdk_cairo_region (cr, range_clip);
cairo_clip (cr);
cairo_region_destroy (range_clip);
graphene_rect_init (&bounds,
clip.x - allocation.x, clip.y - allocation.y,
clip.width, clip.height);
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &bounds,
- "Popover");
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &bounds,
+ "Popover");
/* Render the rect background */
gtk_render_background (context, cr,
rect_x, rect_y,
if (gsk_rounded_rect_is_rectilinear (&bg->boxes[clip]))
{
- gtk_snapshot_append_color_node (snapshot,
- bg_color,
- &bg->boxes[clip].bounds,
- "BackgroundColor");
+ gtk_snapshot_append_color (snapshot,
+ bg_color,
+ &bg->boxes[clip].bounds,
+ "BackgroundColor");
}
else
{
gtk_snapshot_push_rounded_clip (snapshot,
&bg->boxes[clip],
"BackgroundColorClip");
- gtk_snapshot_append_color_node (snapshot,
- bg_color,
- &bg->boxes[clip].bounds,
- "BackgroundColor");
+ gtk_snapshot_append_color (snapshot,
+ bg_color,
+ &bg->boxes[clip].bounds,
+ "BackgroundColor");
gtk_snapshot_pop (snapshot);
}
}
double double_width[4] = { border_width[0], border_width[1], border_width[2], border_width[3] };
cairo_t *cr;
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &outline->bounds,
- "BorderStroke");
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &outline->bounds,
+ "BorderStroke");
render_frame_stroke (cr, outline, double_width, colors, hidden_side, stroke_style);
cairo_destroy (cr);
}
{
double double_width[4] = { border_width[0], border_width[1], border_width[2], border_width[3] };
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &bounds,
- "Border Image");
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &bounds,
+ "Border Image");
gtk_border_image_render (&border_image, double_width, cr, 0, 0, width, height);
cairo_destroy (cr);
}
0, 0,
gsk_texture_get_width (texture) / texture_scale,
gsk_texture_get_height (texture) / texture_scale);
- gtk_snapshot_append_texture_node (snapshot, texture, &bounds, "Icon");
+ gtk_snapshot_append_texture (snapshot, texture, &bounds, "Icon");
}
else
{
gtk_snapshot_push_transform (snapshot, &matrix, "Icon Transform");
graphene_rect_init (&bounds, 0, 0, gsk_texture_get_width (texture), gsk_texture_get_height (texture));
- gtk_snapshot_append_texture_node (snapshot, texture, &bounds, "Icon");
+ gtk_snapshot_append_texture (snapshot, texture, &bounds, "Icon");
gtk_snapshot_pop (snapshot);
}
gtk_style_context_get_color (context, &color);
if (orientation == GTK_ORIENTATION_HORIZONTAL)
- gtk_snapshot_append_color_node (snapshot,
- &color,
- &GRAPHENE_RECT_INIT(x + width / 2, y, 1, height),
- "ScaleMark");
+ gtk_snapshot_append_color (snapshot,
+ &color,
+ &GRAPHENE_RECT_INIT(x + width / 2, y, 1, height),
+ "ScaleMark");
else
- gtk_snapshot_append_color_node (snapshot,
- &color,
- &GRAPHENE_RECT_INIT(x, y + height / 2, width, 1),
- "ScaleMark");
+ gtk_snapshot_append_color (snapshot,
+ &color,
+ &GRAPHENE_RECT_INIT(x, y + height / 2, width, 1),
+ "ScaleMark");
gtk_style_context_restore (context);
* a cairo context, and maintains a stack of render nodes and their associated
* transformations.
*
- * The node at the top of the stack is the the one that gtk_snapshot_append_node()
+ * The node at the top of the stack is the the one that gtk_snapshot_append()
* operates on. Use the gtk_snapshot_push() and gtk_snapshot_pop() functions to
* change the current node.
*
*
* Use this offset to determine how to offset nodes that you
* manually add to the snapshot using
- * gtk_snapshot_append_node().
+ * gtk_snapshot_append().
*
* Note that other functions that add nodes for you, such as
- * gtk_snapshot_append_cairo_node() will add this offset for
+ * gtk_snapshot_append_cairo() will add this offset for
* you.
**/
void
}
/**
- * gtk_snapshot_append_cairo_node:
+ * gtk_snapshot_append_cairo:
* @snapshot: a #GtkSnapshot
* @bounds: the bounds for the new node
* @name: (transfer none): a printf() style format string for the name for the new node
* Since: 3.90
*/
cairo_t *
-gtk_snapshot_append_cairo_node (GtkSnapshot *snapshot,
- const graphene_rect_t *bounds,
- const char *name,
- ...)
+gtk_snapshot_append_cairo (GtkSnapshot *snapshot,
+ const graphene_rect_t *bounds,
+ const char *name,
+ ...)
{
GskRenderNode *node;
graphene_rect_t real_bounds;
}
/**
- * gtk_snapshot_append_texture_node:
+ * gtk_snapshot_append_texture:
* @snapshot: a #GtkSnapshot
* @texture: the #GskTexture to render
* @bounds: the bounds for the new node
* to the current render node of @snapshot.
**/
void
-gtk_snapshot_append_texture_node (GtkSnapshot *snapshot,
- GskTexture *texture,
- const graphene_rect_t *bounds,
- const char *name,
- ...)
+gtk_snapshot_append_texture (GtkSnapshot *snapshot,
+ GskTexture *texture,
+ const graphene_rect_t *bounds,
+ const char *name,
+ ...)
{
GskRenderNode *node;
graphene_rect_t real_bounds;
}
/**
- * gtk_snapshot_append_color_node:
+ * gtk_snapshot_append_color:
* @snapshot: a #GtkSnapshot
* @color: the #GdkRGBA to draw
* @bounds: the bounds for the new node
* You should try to avoid calling this function if @color is transparent.
**/
void
-gtk_snapshot_append_color_node (GtkSnapshot *snapshot,
- const GdkRGBA *color,
- const graphene_rect_t *bounds,
- const char *name,
- ...)
+gtk_snapshot_append_color (GtkSnapshot *snapshot,
+ const GdkRGBA *color,
+ const graphene_rect_t *bounds,
+ const char *name,
+ ...)
{
GskRenderNode *node;
graphene_rect_t real_bounds;
* Since: 3.90
*/
gboolean
-gtk_snapshot_clips_rect (GtkSnapshot *snapshot,
+gtk_snapshot_clips_rect (GtkSnapshot *snapshot,
const cairo_rectangle_int_t *rect)
{
cairo_rectangle_int_t offset_rect;
gtk_snapshot_translate_2d (snapshot, x, y);
- cr = gtk_snapshot_append_cairo_node (snapshot, &bounds, "Text<%dchars>", pango_layout_get_character_count (layout));
+ cr = gtk_snapshot_append_cairo (snapshot, &bounds, "Text<%dchars>", pango_layout_get_character_count (layout));
_gtk_css_shadows_value_paint_layout (shadow, cr, layout);
void gtk_snapshot_append_node (GtkSnapshot *snapshot,
GskRenderNode *node);
GDK_AVAILABLE_IN_3_90
-cairo_t * gtk_snapshot_append_cairo_node (GtkSnapshot *snapshot,
+cairo_t * gtk_snapshot_append_cairo (GtkSnapshot *snapshot,
const graphene_rect_t *bounds,
const char *name,
...) G_GNUC_PRINTF(3, 4);
GDK_AVAILABLE_IN_3_90
-void gtk_snapshot_append_texture_node (GtkSnapshot *snapshot,
+void gtk_snapshot_append_texture (GtkSnapshot *snapshot,
GskTexture *texture,
const graphene_rect_t *bounds,
const char *name,
...) G_GNUC_PRINTF (4, 5);
GDK_AVAILABLE_IN_3_90
-void gtk_snapshot_append_color_node (GtkSnapshot *snapshot,
+void gtk_snapshot_append_color (GtkSnapshot *snapshot,
const GdkRGBA *color,
const graphene_rect_t *bounds,
const char *name,
cairo_t *cr;
get_insertion_cursor_bounds (height, direction, draw_arrow, &bounds);
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &bounds,
- "%s Cursor", is_primary ? "Primary" : "Secondary");
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &bounds,
+ "%s Cursor", is_primary ? "Primary" : "Secondary");
draw_insertion_cursor (context, cr, 0, 0, height, is_primary, direction, draw_arrow);
GtkStyleContext *context;
cairo_t *cr;
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &GRAPHENE_RECT_INIT (
- MIN (x1, x2),
- MIN (y1, y2),
- ABS (x2 - x1) + 1,
- ABS (y2 - y1) + 1
- ),
- "TreeViewGridLine");
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &GRAPHENE_RECT_INIT (
+ MIN (x1, x2),
+ MIN (y1, y2),
+ ABS (x2 - x1) + 1,
+ ABS (y2 - y1) + 1
+ ),
+ "TreeViewGridLine");
context = gtk_widget_get_style_context (GTK_WIDGET (tree_view));
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR);
gtk_style_context_get_color (context, &color);
- gtk_snapshot_append_color_node (snapshot,
- &color,
- &GRAPHENE_RECT_INIT(
- cell_area.x,
- cell_area.y + cell_area.height / 2,
- cell_area.x + cell_area.width,
- 1
- ),
- "Separator");
+ gtk_snapshot_append_color (snapshot,
+ &color,
+ &GRAPHENE_RECT_INIT(
+ cell_area.x,
+ cell_area.y + cell_area.height / 2,
+ cell_area.x + cell_area.width,
+ 1
+ ),
+ "Separator");
gtk_style_context_restore (context);
}
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR);
gtk_style_context_get_color (context, &color);
- gtk_snapshot_append_color_node (snapshot,
- &color,
- &GRAPHENE_RECT_INIT(
- cell_area.x,
- cell_area.y + cell_area.height / 2,
- cell_area.x + cell_area.width,
- 1
- ),
- "Separator");
+ gtk_snapshot_append_color (snapshot,
+ &color,
+ &GRAPHENE_RECT_INIT(
+ cell_area.x,
+ cell_area.y + cell_area.height / 2,
+ cell_area.x + cell_area.width,
+ 1
+ ),
+ "Separator");
gtk_style_context_restore (context);
}
gtk_style_context_add_class (context, GTK_STYLE_CLASS_SEPARATOR);
gtk_style_context_get_color (context, &color);
- gtk_snapshot_append_color_node (&snapshot,
- &color,
- &GRAPHENE_RECT_INIT(
- cell_area.x,
- cell_area.y + cell_area.height / 2,
- cell_area.x + cell_area.width,
- 1
- ),
- "Separator");
+ gtk_snapshot_append_color (&snapshot,
+ &color,
+ &GRAPHENE_RECT_INIT(
+ cell_area.x,
+ cell_area.y + cell_area.height / 2,
+ cell_area.x + cell_area.width,
+ 1
+ ),
+ "Separator");
gtk_style_context_restore (context);
}
{
cairo_t *cr;
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &bounds, "Fallback<%s>",
- G_OBJECT_TYPE_NAME (widget));
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &bounds, "Fallback<%s>",
+ G_OBJECT_TYPE_NAME (widget));
gtk_widget_draw_internal (widget, cr, TRUE);
cairo_destroy (cr);
}
gboolean result;
cairo_t *cr;
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &bounds,
- "DrawSignalContents<%s>", G_OBJECT_TYPE_NAME (widget));
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &bounds,
+ "DrawSignalContents<%s>", G_OBJECT_TYPE_NAME (widget));
g_signal_emit (widget, widget_signals[DRAW], 0, cr, &result);
cairo_destroy (cr);
}
context = gtk_widget_get_style_context (widget);
gtk_style_context_get_color (context, &color);
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &GRAPHENE_RECT_INIT (
- background_area->x, background_area->y,
- background_area->width, background_area->height
- ),
- "CellGraph");
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &GRAPHENE_RECT_INIT (
+ background_area->x, background_area->y,
+ background_area->width, background_area->height
+ ),
+ "CellGraph");
cairo_set_line_width (cr, 1.0);
height = gtk_widget_get_allocated_height (widget);
graphene_rect_init (&rect, 0, 0, width, height);
- cr = gtk_snapshot_append_cairo_node (snapshot,
- &rect,
- "RenderNodeView");
+ cr = gtk_snapshot_append_cairo (snapshot,
+ &rect,
+ "RenderNodeView");
cairo_translate (cr, width / 2.0, height / 2.0);
if (width < viewport.width || height < viewport.height)